﻿using System.Xml.Serialization;

namespace SvnFlow
{
    public class FolderMap
    {
        [XmlAttribute]
        public string Left { get; set; }

        [XmlAttribute]
        public string Right { get; set; }

        public bool Equals(FolderMap other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;

            return other.Left == Left && other.Right == Right;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;

            var obj1 = obj as FolderMap;
            if (ReferenceEquals(null, obj1)) return false;

            return Equals(obj1);
        }

        public override int GetHashCode()
        {
            return (Left + "|" + Right).GetHashCode();
        }
    }
}
